import request from '@/utils/request'

export function fetchProjectList(query) {
  return request({
    url: '/project/list',
    method: 'get',
    params: query
  })
}

export function fetchProject(id) {
  return request({
    url: `/project`,
    method: 'get',
    params: { id: id }
  })
}

export function createProject(data) {
  return request({
    url: '/project',
    method: 'post',
    data: data
  })
}

export function updateProject(data) {
  return request({
    url: '/project',
    method: 'put',
    data: data
  })
}
